#
# AI Events
#
#   written by 
#		Generalisimo
#
# C.O.R.E. v0.7 transition to CSV complete (not needed)

############################################################################################
# COMMONWEALTH PROTECTION FROM SEALION OPERATION (1510020-1510023)
############################################################################################

event = {
	id = 1510020
	random = no
	country = ENG
	
	trigger = {
      	ai = yes     
		war = { country = GER country = ENG }
	  	NOT = {
				control = { province = 488 data = ENG } # Newcastle
				control = { province = 489 data = ENG } # Manchester
				control = { province = 490 data = ENG } # Sheffield
				control = { province = 491 data = ENG } # Cardiff
				control = { province = 497 data = ENG } # Birmingham
				control = { province = 498 data = ENG } # Coventry
				control = { province = 499 data = ENG } # London
				control = { province = 500 data = ENG } # Bristol
				control = { province = 501 data = ENG } # Plymouth
				control = { province = 502 data = ENG } # Southampton
				control = { province = 503 data = ENG } # Porstmouth
		}
	}
	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = trigger which = 1510021 } # CAN
	}
}

event = {
	id = 1510021
	random = no
	country = CAN

	# triggered by ENG 1510020

	name = AI_EVENT
	desc = ""
	style = 0

	action_a = {
		command = { type = ai which = core_CW_Sealion.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510022
	random = no
	country = ENG

	# Germans expelled from England

	trigger = {
		ai = yes
		event = 1510020 # Operation Sea Lion Defense
			control = { province = 482 data = ENG } # 
			control = { province = 483 data = ENG } # 
			control = { province = 484 data = ENG } # 
			control = { province = 485 data = ENG } # 
			control = { province = 486 data = ENG } # 
			control = { province = 487 data = ENG } # 
			control = { province = 488 data = ENG } # Newcastle
			control = { province = 489 data = ENG } # Manchester
			control = { province = 490 data = ENG } # Sheffield
			control = { province = 491 data = ENG } # Cardiff
			control = { province = 497 data = ENG } # Birmingham
			control = { province = 498 data = ENG } # Coventry
			control = { province = 499 data = ENG } # London
			control = { province = 500 data = ENG } # Bristol
			control = { province = 501 data = ENG } # Plymouth
			control = { province = 502 data = ENG } # Southampton
			control = { province = 503 data = ENG } # Porstmouth
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_38.ai }
		command = { type = trigger which = 1510023 } # CAN
	}
}

event = {
	id = 1510023
	random = no
	country = CAN

	# triggered by ENG 1510022
	
	name = AI_EVENT
	desc = ""
	style = 0 

	action_a = {
		command = { type = ai which = core_CAN_War.ai }
		command = { type = ai which = core_Defensive.ai }
	}
}

############################################################################################
# COMMONWEALTH AI CHANGES (PEACE TO WAR ECONOMY/MILITARY) (1510024-1510029)
############################################################################################

event = {
	id = 1510024
	random = no
	country = ENG

	trigger = {
		ai = yes
		OR = {
			control = { province = 578 data = GER }
			atwar = yes
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_38.ai }
	}
}

event = {
	id = 1510025
	random = no
	country = CAN

	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CAN_War.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510026
	random = no
	country = AST
	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_AST_War.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510027
	random = no
	country = NZL

	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_NZL_War.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510028
	random = no
	country = SAF
	trigger = {
		ai = yes
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SAF_War.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510029
	random = no
	country = EGY

	trigger = {
		ai = yes
		atwar = yes
		alliance = { country = EGY  country = ENG }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_EGY_Allied.ai }
	}
}

############################################################################################
# COMMONWEALTH STRATEGY CHANGE (1510030-1510033)
############################################################################################

event = {
	id = 1510030
	random = no
	country = ENG

	# England Changes focus to North Africa and the Medeteranean

	trigger = {
		ai = yes
		war = { country = ENG country = ITA }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ENG_Africa.ai }
	}
}

event = {
	id = 1510031
	random = no
	country = CAN

	# Canada goes on the defensive after the fall of France, buiding up for D-Day

	trigger = {
		ai = yes
		atwar = yes
		exists = VIC
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Defensive.ai }
	}
}

event = {
	id = 1510032
	random = no
	country = AST

	trigger = {
		ai = yes
		war = { country = JAP country = AST }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CW_Pacific.ai }
	}
}

event = {
	id = 1510033
	random = no
	country = NZL

	trigger = {
		ai = yes
		war = { country = JAP country = NZL }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_CW_Pacific.ai }
	}
}

############################################################################################
# ALLIES D-DAY INVASION (1510034-1510038)
############################################################################################

event = {
	id = 1510034
	random = no
	country = ENG

	trigger = {
		ai = yes
		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_D-Day.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 1510035
	random = no
	country = CAN

	trigger = {
		ai = yes
		war = { country = CAN country = GER }
		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_D-Day.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

#(by Copper)#

event = {
	id = 1510036
	random = no
	country = FRA

	trigger = {
		ai = yes
		war = { country = FRA country = GER }
		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_FRA_Attack.ai }
	}
}

event = {
	id = 1510037
	random = no
	country = BEL

	trigger = {
		ai = yes
		war = { country = BEL country = GER }
		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_D-Day.ai }
	}
}

event = {
	id = 1510038
	random = no
	country = HOL

	trigger = {
		ai = yes
		war = { country = HOL country = GER }
		war = { country = ENG country = GER }
		war = { country = GER country = SOV }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_D-Day.ai }
	}
}

############################################################################################
# FRANCE STRATEGY CHANGES (1510039-1510042)
############################################################################################

event = {
	id = 1510039
	random = no
	country = FRA

	# 20% chance for france to go static defence.. :)

	trigger = {
		ai = yes
		random = 20 # Only happens one time in five
	}
	
	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1936 }

	action_a = {
		name = OK
		command = { type = ai which = core_FRA_Static.ai }
	}
}

event = {
	id = 1510040
	random = no
	country = FRA

	trigger = {
		ai = yes
		OR = {
			control = { province = 578 data = GER }
			atwar = yes
			}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1942 }

	action_a = {
		command = { type = ai which = core_FRA_38.ai }
	}
}				

event = {
	id = 1510041
	random = no
	country = FRA

	# France has fallen, continue the fight in the colonies

	trigger = { 
		ai = yes
		exists = VIC
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Colonies.ai }
	}
}		

# LIBERATION OF FRANCE - MODIFIED (by Copper)#
#
# This event makes Allied forces in France more agressive
#########################################################

event = {
	id = 1510042
	random = no
	country = FRA

	trigger = {
		ai = yes
		event = 2802 # Liberation of France event
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
				command = { type = ai which = core_FRA_attack.ai }
	}
}	

############################################################################################
# LOW COUNTRIES STRATEGY CHANGES (1510043-1510046)
############################################################################################

event = {
	id = 1510043
	random = no
	country = BEL
	
	trigger = { 
		ai = yes 
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 1
	deathdate = { day = 1 month = december year = 1946 }

	action_a = {
		name = Ok
		command = { type = ai which = core_BEL_War.ai }
	}
}

event = {
	id = 1510044
	random = no
	country = BEL
	
	trigger = { 
		ai = yes 
		OR = {
			control = { province = 548 data = GER }  
			control = { province = 552 data = GER }  
			control = { province = 557 data = GER }  
		}                             
	}

	name = CEVTNAME_1510044
	desc = CEVTDESC_1510044
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 3
	deathdate = { day = 1 month = december year = 1946 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = capital which = 1130 } # Leopoldville
		command = { type = ai which = core_Colonies.ai }
	}
}

event = {
	id = 1510045
	random = no
	country = HOL
	
	trigger = { 
		ai = yes 
		atwar = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 1
	deathdate = { day = 1 month = december year = 1946 }

	action_a = {
		name = Ok
		command = { type = ai which = core_HOL_War.ai }
	}
}

event = {
	id = 1510046
	random = no
	country = HOL
	
	trigger = { 
		ai = yes 
		OR = {    
			control = { province = 561 data = GER }  
			control = { province = 590 data = GER }  
			control = { province = 550 data = GER }  
			control = { province = 551 data = GER }  
		}
	}

	name = CEVTNAME_1510046
	desc = CEVTDESC_1510046
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 3
	deathdate = { day = 1 month = december year = 1941 }

	action_a = {
		name = CEVTACTA_OK
		command = { type = capital which = 1780 } # Batavia
		command = { type = ai which = core_Colonies.ai }
	}
}

############################################################################################
# ITALY STRATEGY CHANGES (1510047-1510050)
############################################################################################

event = {
	id = 1510047
	random = no
	country = ITA

	trigger = {
		ai = yes
		year = 1938		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = september year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1938 }

	action_a = {
		command = { type = ai which = core_ITA_38.ai }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
	}
}

event = {
	id = 1510048
	random = no
	country = ITA

	# Italy joins the Axis

	trigger = {
		ai = yes
		alliance = { country = GER country = ITA }		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Axis.ai }
		command = { type = build_division which = infantry }
		command = { type = build_division which = infantry }
	}
}

event = {
	id = 1510049
	random = no
	country = ITA

	# Italy joins the Allies

	trigger = {
		ai = yes
		alliance = { country = ENG country = ITA }		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Allied.ai }
	}
}

event = {
	id = 1510050
	random = no
	country = ITA

	# Italy on the defensive

	trigger = {
		ai = yes
		NOT = {
			control = { province = 900 data = ITA } 
			control = { province = 901 data = ITA } 
			control = { province = 902 data = ITA } 
			control = { province = 903 data = ITA }
			control = { province = 905 data = ITA }
			control = { province = 906 data = ITA }
			control = { province = 907 data = ITA }
			control = { province = 908 data = ITA }
			control = { province = 910 data = ITA }
			control = { province = 912 data = ITA }
			control = { province = 914 data = ITA }
			control = { province = 915 data = ITA }
			control = { province = 1085 data = ITA } # Tripoli
			control = { province = 1097 data = ITA } # Tobruk
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Defensive.ai }
	}
}

############################################################################################
# UNITED STATES STRATEGY CHANGES (1510051-1510054)
############################################################################################

event = {
	id = 1510051
	random = no
	country = USA

	# Pre-War AI file for the United States

	trigger = {
		ai = yes
		war = { country = GER country = ENG }		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_USA_39.ai }
	}
}

event = {
	id = 1510052
	random = no
	country = USA

	# US Goes on the offensive

	trigger = {
		ai = yes
		atwar = yes
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_USA_War.ai }
	}
}

event = {
	id = 1510053
	random = no
	country = USA

	# Target: Iberia
	
	trigger = {
		ai = yes     
		war = { country = USA country = POR }
		war = { country = USA country = SPA }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1940 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		name = West
		command = { type = ai which = core_USA_Iberia.ai }
	}
}

event = {
	id = 1510054
	random = no
	country = USA

	# USA Target: Italy and France
	
	trigger = {
      	ai = yes
		event = 1510053 # Spain and Portugal were targets
		war = { country = USA country = GER }
		control = { province = 451 data = USA } # Portugal and Spain
		control = { province = 1020 data = USA }
		control = { province = 1019 data = USA }
		control = { province = 975 data = USA }
		NOT = {
			control = { province = 956 data = SPA } # Spain
			control = { province = 988 data = SPA }
			control = { province = 996 data = SPA }
			control = { province = 981 data = SPA }
			control = { province = 990 data = SPA }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1940 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_USA_War.ai }

	}
}

############################################################################################
# USSR STRATEGY CHANGES (1510055-1510058)
############################################################################################

event = {
	id = 1510055
	random = no
	country = SOV

	# Post Winter War AI

	trigger = {
		ai = yes
		NOT = {
			war = { country = SOV country = POL }
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = march year = 1940 }
	offset = 5 
	deathdate = { day = 29 month = december year = 1940 }

	action_a = {
		command = { type = ai which = core_SOV_40.ai }
	}
}

event = {
	id = 1510056
	random = no
	country = SOV

	# USSR goes on the offensive

	trigger = {
		ai = yes
		war = { country = GER country = USA }
		war = { country = GER country = ENG }
		war = { country = GER country = SOV }
		# event = 10012 # USSR_defense.ai (This event was blocked off)
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SOV_Rebound.ai }
	}
}

event = {
	id = 1510057
	random = no
	country = SOV

	# 'Suvorov style' offensive

	trigger = {
		ai = yes
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_SOV_Rebound.ai }
	}
}

event = {
	id = 1510058  # Normal Termination of Soviet GPW vs Human German player
	random = no
	country = SOV

	trigger = {
		ai = yes
		event = 1500003 # Human German player
		event = 222084 # Great Patriotic War

		NOT = {
				war = { country = SOV country = ENG }
				war = { country = SOV country = USA }
		}
		
		NOT = {
			control = { province = 602 data = GER } # Berlin
			control = { province = 716 data = GER } # Polish territories
			control = { province = 717 data = GER } # Polish territories
			control = { province = 718 data = GER } # Polish territories
			control = { province = 721 data = GER } # Polish territories
			control = { province = 719 data = GER } # Polish territories
			control = { province = 725 data = GER } # Polish territories
			control = { province = 720 data = GER } # Polish territories
			control = { province = 722 data = GER } # Polish territories
			control = { province = 649 data = GER } # Polish territories
			control = { province = 723 data = GER } # Polish territories
			control = { province = 643 data = GER } # Polish territories
			control = { province = 642 data = GER } # Polish territories
			control = { province = 724 data = GER } # Polish territories
			control = { province = 707 data = GER } # Baltic territories
			control = { province = 708 data = GER } # Baltic territories
			control = { province = 709 data = GER } # Baltic territories
			control = { province = 713 data = GER } # Baltic territories
			control = { province = 712 data = GER } # Baltic territories
			control = { province = 711 data = GER } # Baltic territories
			control = { province = 714 data = GER } # Baltic territories
		}

		control = { province = 846 data = SOV } # Moscow
		control = { province = 788 data = SOV } # Leningrad
		control = { province = 1225 data = SOV } # Stalingrad
		control = { province = 1359 data = SOV } # Caucasus region
		control = { province = 1360 data = SOV } # Caucasus region
		control = { province = 1260 data = SOV } # Caucasus region
		control = { province = 1259 data = SOV } # Caucasus region
		control = { province = 1258 data = SOV } # Caucasus region
		control = { province = 1220 data = SOV } # Caucasus region
		control = { province = 1222 data = SOV } # Caucasus region
		control = { province = 1256 data = SOV } # Caucasus region
		control = { province = 862 data = SOV } # Western USSR border
		control = { province = 863 data = SOV } # Western USSR border
		control = { province = 764 data = SOV } # Western USSR border
		control = { province = 769 data = SOV } # Western USSR border
		control = { province = 766 data = SOV } # Western USSR border
		control = { province = 774 data = SOV } # Western USSR border
		control = { province = 773 data = SOV } # Western USSR border
		control = { province = 772 data = SOV } # Western USSR border
		control = { province = 778 data = SOV } # Western USSR border
		control = { province = 784 data = SOV } # Western USSR border
		control = { province = 785 data = SOV } # Western USSR border
		control = { province = 791 data = SOV } # Western USSR border		
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = gain_tech which = 11514 } # End of GPW
		command = { type = ai which = core_SOV_Post.ai }
		command = { type = sleepevent which = 1510085 } # alternate GPW-end event
	}
}

event = {
	id = 1510085  # Early  Termination of Soviet GPW vs German AI Player
	random = no
	country = SOV

	trigger = {
		ai = yes
		NOT = {
			event = 1500003 # Human German player
		}
		event = 222084 # Great Patriotic War

		NOT = {
				war = { country = SOV country = ENG }
				war = { country = SOV country = USA }
		}
		
		OR = {
			AND = {
				control = { province = 602 data = SOV } # Berlin
				control = { province = 607 data = SOV } # Landsberg
				control = { province = 604 data = SOV } # Dresden
				control = { province = 598 data = SOV } # Rostock	
			}
		
			AND = {
				NOT = {
					control = { province = 716 data = GER } # Polish territories
					control = { province = 717 data = GER } # Polish territories
					control = { province = 718 data = GER } # Polish territories
					control = { province = 721 data = GER } # Polish territories
					control = { province = 719 data = GER } # Polish territories
					control = { province = 725 data = GER } # Polish territories
					control = { province = 707 data = GER } # Baltic territories
					control = { province = 708 data = GER } # Baltic territories
				}

				control = { province = 846 data = SOV } # Moscow
				control = { province = 788 data = SOV } # Leningrad
				control = { province = 1225 data = SOV } # Stalingrad
				control = { province = 1359 data = SOV } # Caucasus region
				control = { province = 1360 data = SOV } # Caucasus region
				control = { province = 1260 data = SOV } # Caucasus region
				control = { province = 1259 data = SOV } # Caucasus region
				control = { province = 1258 data = SOV } # Caucasus region
				control = { province = 1220 data = SOV } # Caucasus region
				control = { province = 1222 data = SOV } # Caucasus region
				control = { province = 1256 data = SOV } # Caucasus region
				control = { province = 862 data = SOV } # Western USSR border
				control = { province = 863 data = SOV } # Western USSR border
				control = { province = 764 data = SOV } # Western USSR border
				control = { province = 769 data = SOV } # Western USSR border
				control = { province = 766 data = SOV } # Western USSR border
				control = { province = 774 data = SOV } # Western USSR border
				control = { province = 773 data = SOV } # Western USSR border
				control = { province = 772 data = SOV } # Western USSR border
				control = { province = 778 data = SOV } # Western USSR border
				control = { province = 784 data = SOV } # Western USSR border
				control = { province = 785 data = SOV } # Western USSR border
				control = { province = 791 data = SOV } # Western USSR border		
			}
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1942 }
	offset = 7
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = gain_tech which = 11514 } # End of GPW
		command = { type = ai which = core_SOV_Post.ai }
		command = { type = sleepevent which = 1510058 } # alternate GPW-end event
	}
}


############################################################################################
# GERMANY STRATEGY CHANGES (10001-10005)
############################################################################################
#
# Now in 071.txt
#

############################################################################################
# BRAZIL JOINS THE ALLIES (1510059)
############################################################################################

event = {
	id = 1510059
	random = no
	country = BRA

	trigger = {
		ai = yes
		atwar = yes
		alliance = { country = BRA  country = ENG }
		}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_Brazil_War_allies.ai }
	}
}


############################################################################################
# ETHIOPIA JOINS THE AXIS (1510062)
############################################################################################

event = {
	id = 1510062
	random = no
	country = ETH
	
	trigger = {
	      	ai = yes     
		OR = {
			puppet = { country = ETH country = ITA } 
			alliance = { country = ETH country = GER }
			}
		}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1936 }
	offset = 15 # Check for trigger conditions every 3 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_ETH_Axis.ai }
	}
}

############################################################################################
# NATIONALIST CHINA JOINS THE ALLIES (1510063)
############################################################################################

event = {
	id = 1510063
	random = no
	country = CHI

	trigger = {
		ai = yes
		exists = ENG
		war = { country = JAP country = CHI } #Japan has DOW'ed China
		war = { country = JAP country = USA } #Japan has DOW'ed USA
		alliance = { country = JAP country = GER } #Japan has gone Axis
		NOT = {
			alliance = { country = CHI country = USA } #If UK is already annexed
			alliance = { country = CHI country = ENG } #China shouldn't be Allied yet
			alliance = { country = CHI country = GER } #China shouldn't be Axis either
			alliance = { country = CHI country = SOV } #China shouldn't be Comintern
			alliance = { country = GER country = ENG } #England shouldn't have left the Allies
			war = { country = ENG country = CHI } # China shouldn't be at war with England
	      }
	}

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	name = CEVTNAME_1510063
	desc = CEVTDESC_1510063
	style = 0

	action_a = {
		name = CEVTACTA_OK
		command = { type = alliance which = ENG }
		command = { type = alignment which = democratic value = 100 }
		command = { type = dissent value = -10 }
		}
	}

############################################################################################
# BALKANS AXIS, COMINTERM OR ALLIES (1510064-1510078)
############################################################################################

event = {
	id = 1510064
	random = no
	country = BUL

	# Bulgaria joins the Cominterm
	
	trigger = {
		Alliance = { Country = SOV country = BUL }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510065
	random = no
	country = BUL

	# Bulgaria joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = BUL }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510066
	random = no
	country = CZE

	# Czechoslovakia joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = CZE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510067
	random = no
	country = CZE

	# Czechoslovakia joins the Cominterm
	
	trigger = {
		Alliance = { Country = SOV country = CZE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510068
	random = no
	country = CZE

	# Czechoslovakia joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = CZE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510069
	random = no
	country = GRE

	# Greece joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = GRE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510070
	random = no
	country = GRE

	# Greece joins the Cominterm
	
	trigger = {
		Alliance = { Country = SOV country = GRE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510071
	random = no
	country = GRE

	# Greece joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = GRE }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510072
	random = no
	country = HUN

	# Hungary joins the Cominterm
	
	trigger = {
		alliance = { Country = SOV country = HUN }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510073
	random = no
	country = HUN

	# Hungary joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = HUN }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510074
	random = no
	country = ROM

	# Romania joins the Cominterm
	
	trigger = {
		Alliance = { Country = SOV country = ROM }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510075
	random = no
	country = ROM

	# Romania joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = ROM }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

event = {
	id = 1510076
	random = no
	country = YUG

	# Yugoslavia joins the Allies
	
	trigger = {
		Alliance = { Country = ENG country = YUG }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510077
	random = no
	country = YUG

	# Yugoslavia joins the Cominterm
	
	trigger = {
		Alliance = { Country = SOV country = YUG }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Allied.ai }
	}
}

event = {
	id = 1510078
	random = no
	country = YUG

	# Yugoslavia joins the Axis
	
	trigger = {
		Alliance = { Country = GER country = YUG }
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_BKN_Axis.ai }
	}
}

############################################################################################
# CONVOYS (1510079-1510080)
############################################################################################

event = {
	id = 1510079
	random = no
	country = USA

	# United States to United Kingdom sending Oil and Supplies

	trigger = {
		ai = yes
		war = { country = USA country = GER }
		war = { country = GER country = ENG }
	}
	
	name = AI_Event
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 15 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 125 value = 489 when = 17 } # Boston to Manchester
	}
}

event = {
	id = 1510080
	random = no
	country = CAN

	# Canada to United Kingdom sending Steel and Supplies

	trigger = {
		ai = yes
		atwar = yes
		atwar = ENG
	}
	
	name = AI_Event
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 15 # Check for trigger conditions every 5 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = convoy which = 153 value = 489 when = 18 } # Halifax to Manchester
	}
}

############################################################################################
# FRANCE HARD C.O.R.E. (1510081) (by Copper)
############################################################################################

event = {
	id = 1510081
	random = no
	country = FRA

	trigger = {
		ai = yes
		flag = ger_hard # Germans are using HARD C.O.R.E.
		war = { country = FRA country = GER }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_FRA_attack.ai }
	}
}

############################################################################################
# GERMANY EARLY WAR STRATEGY CHANGES (1510082-1510084)
############################################################################################

event = {
	id = 1510082
	random = no
	country = GER

	# Fall Weiss AI attack on Poland
	
	trigger = {
		ai = yes   
		war = { country = GER country = POL }
		NOT = { event = 10005 } #GER_Defense.ai file
		AND = {
			NOT = { event = 432011 }# French resistance to GER occupation of Rhineland
			#event = 9000203 # Poles have pressured Germany (not yet implemented)
			NOT = { war = { country = GER country = FRA } }  # early war
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1936 }
	offset = 4 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_GER_FallWeiss.ai }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
	}
}

event = {
	id = 1510083
	random = no
	country = GER

	# Phony war AI
	
	trigger = {
		ai = yes
		exists = FRA
		NOT = { 
			exists = POL
			war = { country = GER country = SOV }
		}
		OR = {
			year = 1940
			AND = {
				event = 432011				#French ultimatum following Rhineland
				war = { country = FRA country = GER }
			}
			AND = {
				event = 1500008 			#Human French Player
				war = { country = FRA country = GER }
			}
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = september year = 1936 }
	offset = 10 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_GER_FallGelb.ai }
	}
}

event = {
	id = 1510084
	random = no
	country = GER

	trigger = {
		ai = yes
		technology = 4401 # Vehicle assembly
		atwar = no
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = january year = 1938 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1939 }
	
	action_a = {
		command = { type = ai which = core_GER_38.ai }
		command = { type = build_division which = transports }
		command = { type = build_division which = transports }
	}
}
event = {
	id = 1510092
	random = no
	country = GER

	trigger = {
		ai = yes
		atwar = no
		technology = 4401 # Vehicle assembly
		NOT = {
			event = 1510082  #FallWeiss AI
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = april year = 1939 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = may year = 1940 }
	
	action_a = {
		command = { type = ai which = core_GER_mid39.ai }
	}
}

event = {
	id = 1510097
	random = no
	country = GER
	
	trigger = {
		ai = yes
		atwar = yes
		NOT = {
			event = 1510092 #GER_Mid39.ai
			event = 1510083 #GER_FallGelb.ai
			event = 1510082 #GER_FallWeiss.ai
			event = 10003   #GER_Barbarossa (early English defeat)
		}	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 12
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = ai which = core_GER_FallRot.ai }
	}
}

event = {
	id = 1510098
	random = no
	country = GER
	
	trigger = {
		ai = yes
		atwar = no
		event = 1510097
		#NOT = { technology = 4401 }  # Vehicle assembly 
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 13
	deathdate = { day = 30 month = december year = 1938 }

	action_a = {
		command = { type = ai which = core_GER_36.ai }
	}
}

event = {
	id = 1510099
	random = no
	country = GER
	
	trigger = {
		ai = yes
		atwar = yes
		event = 1510098
		NOT = {
			event = 1510092 #GER_Mid39.ai
			event = 1510083 #GER_FallGelb.ai
			event = 1510082 #GER_FallWeiss.ai
			event = 10003   #GER_Barbarossa (early English defeat)
		}	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 14
	deathdate = { day = 30 month = august year = 1939 }

	action_a = {
		command = { type = ai which = core_GER_FallRot.ai }
	}
}


# USA goes defensive - Germany has won in Europe (by Copper)#
#
# This event makes US Army more willing to defend borders and beaches of the USA mainland
#########################################################

event = {
	id = 1510086
	random = no
	country = USA

	trigger = {
		ai = yes

		OR = {
			event = 5308 # Bitter peace events
			event = 5309 # Bitter peace events
			event = 5310 # Bitter peace events
			event = 5311 # Bitter peace events
			event = 5332 # Bitter peace events
			event = 5333 # Bitter peace events

			NOT = {
				event = 5360 # Total Victory
			}
		}


		OR = {

			ispuppet = ENG

			AND = {
				control = { province = 488 data = GER } # Newcastle
				control = { province = 489 data = GER } # Manchester
				control = { province = 490 data = GER } # Sheffield
				control = { province = 491 data = GER } # Cardiff
				control = { province = 497 data = GER } # Birmingham
				control = { province = 498 data = GER } # Coventry
				control = { province = 499 data = GER } # London
				control = { province = 500 data = GER } # Bristol
				control = { province = 501 data = GER } # Plymouth
				control = { province = 502 data = GER } # Southampton
				control = { province = 503 data = GER } # Porstmouth
			}

			NOT = {
				exists = ENG
			}
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1938 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
				command = { type = ai which = core_USA_defense.ai }
	}
}	

############################################################
#SPAIN START OF SCW (1510088)
#################################################
event = {
	id = 1510088
	random = no
	country = SPR

	# Start of SCW
	
	trigger = {
		ai = yes   
		exists = SPA
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 17 month = july year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_SPR.ai }
	}
}
############################################################################################
# SPAIN SPANISH CIVIL WAR RESULTS (1510060-1510061)
############################################################################################

event = {
	id = 1510060
	random = no
	country = SPA

	# Nationalist Spain wins the Civil War
	
	trigger = {
		ai = yes 
	      	NOT = {
			exists = SPR
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_postSCW.ai }
	}
}

event = {
	id = 1510061
	random = no
	country = SPR

	# Republican Spain wins the Civil War
	
	trigger = {
		ai = yes 
	      	NOT = {
			exists = SPA
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_postSCW.ai }
	}
}

####################################
# SPAIN : WAR IN EUROPE	(1510089 - 1510090) 

event = {
	id = 1510089
	random = no
	country = SPA

	# Nationalist Spain cautious
	
	trigger = {
		ai = yes 
		NOT = {
			exists = SPR
			}
	      	OR = {
			war = { country = GER country = ENG }
			war = { country = ITA country = ENG }	
			atwar = yes	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_39.ai }
		command = { type = construct which = coastal_fort value = 956 } #Gijn
		command = { type = construct which = coastal_fort value = 969 } #Barcelona
		command = { type = construct which = coastal_fort value = 981 } #Valncia
	}
}


event = {
	id = 1510090
	random = no
	country = SPR

	# Rep.Spain cautious
	
	trigger = {
		ai = yes 
		NOT = {
			exists = SPA
			}
	      	OR = {
			war = { country = GER country = ENG }
			war = { country = ITA country = ENG }	
			atwar = yes
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_39.ai }
		command = { type = construct which = coastal_fort value = 956 } #Gijn
		command = { type = construct which = coastal_fort value = 969 } #Barcelona
		command = { type = construct which = coastal_fort value = 981 } #Valncia
	}
}

# Poland goes to war - early conflict on the Rheinland (by Copper)#
#
# This event makes Polish army more willing to conduct offensive against Germany
#########################################################

event = {
	id = 1510091
	random = no
	country = POL

	trigger = {
		ai = yes
		war = { country = FRA country = GER }

	NOT = {
		OR = {
			alliance = { country = POL country = GER }
			war = { country = POL country = SOV }
			}
		}
	}
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15 # Check for trigger conditions every 15 days
	deathdate = { day = 30 month = december year = 1938 }

	action_a = {
				command = { type = ai which = core_POL_36_attack.ai }
	}
}	

###

####################################
# SPAIN : WAR 	(1510093 - 1510096) 

event = {
	id = 1510093
	random = no
	country = SPA

	# Nationalist Spain Axis or atwar with allies/commies
	
	trigger = {
		ai = yes 
		event = 1510089 #ai_event SPA cautious
	      	OR = {
			war = { country = SPA country = ENG }
			war = { country = SPA country = FRA }	
			war = { country = SPA country = USA }
			war = { country = SPA country = SOV }	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Axis.ai }
	}
}


event = {
	id = 1510094
	random = no
	country = SPA

	# Nat. Spain Allied or atwar with Axis
	
	trigger = {
		ai = yes 
		event = 1510089 #ai_event SPA cautious
	      	OR = {
			war = { country = SPA country = GER }
			war = { country = SPA country = ITA }	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Allied.ai }
	}
}
 

event = {
	id = 1510095
	random = no
	country = SPR

	# Rep Spain Axis or atwar with allies/commies
	
	trigger = {
		ai = yes 
		event = 1510090 #ai_event SPR cautious
	      	OR = {
			war = { country = SPR country = ENG }
			war = { country = SPR country = FRA }	
			war = { country = SPR country = USA }	
			war = { country = SPR country = SOV }
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Axis.ai }
	}
}


event = {
	id = 1510096
	random = no
	country = SPR

	# Nat. Spain Allied or atwar with Axis
	
	trigger = {
		ai = yes 
		event = 1510090 #ai_event SPR cautious
	      	OR = {
			war = { country = SPR country = GER }
			war = { country = SPR country = ITA }	
			}
	}

	name = AI_EVENT
	desc = ""
	style = 0
	
	date = { day = 1 month = october year = 1937 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }
	
	action_a = {
		command = { type = ai which = core_Spain_Allied.ai }
	}
}


###################################################################################################################
# German AI - Fall Weserubung (to keep Germany from idling through 1940 if at peace and Altmark hasn't occured)
# ------- slightly different triggers and different search dates
###################################################################################################################

event = {
	id = 1510100
	random = no 
	country = GER
	
	trigger = {
		ai = yes
		atwar = no
		random = 55
		event = 1510083 # Fall Gelb AI for Germany
		OR = {
			ispuppet = POL
			NOT = { exists = POL }
		}                    
		NOT = {
			event = 172048 #Decision on Fall Weserubung
			event = 1002001 #Altmark - Norway
			war = { country = NOR country = GER }
			war = { country = NOR country = ENG }
			war = { country = NOR country = SOV }
			alliance = { country = NOR country = GER }
			alliance = { country = NOR country = ENG }
			alliance = { country = NOR country = SOV }
			alliance = { country = SWE country = SOV }
			alliance = { country = DEN country = SOV }
		}	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 14 month = february year = 1940 }
	offset = 9
	deathdate = { day = 30 month = may year = 1940 }

	action_a = {
		#name = Begin operation Fall Weserubung: invade Denmark and Norway
		command = { type = add_division which = transports } # mobilise the German merchant fleet
		command = { type = add_division which = transports } # mobilise the German merchant fleet
		command = { type = supplies value = -500 }
		command = { type = warentry which = USA value = 2 }
		command = { type = war which = NOR }
		command = { type = trigger which = 1002004 } # Norway
		command = { type = sleepevent which = 1002001 } # sleep Altmark Incident
		command = { type = sleepevent which = 172049 } # sleep orig Fall Weserubung
	}

	action_b = {
		#name = Cancel the invasion of Denmark and Norway
		command = { type = warentry which = USA value = -4 }
		command = { type = warentry which = DEN value = -2 }
		command = { type = warentry which = NOR value = -2 }
		command = { type = warentry which = SWE value = -2 }
		command = { type = sleepevent which = 1002002 } # No pressure on Denmark
		command = { type = sleepevent which = 1002001 } # sleep Altmark Incident
		command = { type = sleepevent which = 172049 } # sleep orig Fall Weserubung
	}
	action_c = {
		#name = Expand the plan: invade Denmark, Norway, and Sweden
		command = { type = add_division which = transports } # mobilise the German merchant fleet
		command = { type = add_division which = transports } # mobilise the German merchant fleet
		command = { type = supplies value = -500 }
		command = { type = warentry which = USA value = 4 }
		command = { type = war which = NOR }
		command = { type = war which = SWE }
		command = { type = trigger which = 1002004 } # Norway
		command = { type = trigger which = 1002005 } # Sweden
		command = { type = sleepevent which = 1002001 } # sleep Altmark Incident
		command = { type = sleepevent which = 172049 } # sleep orig Fall Weserubung
	}
}

event = {
	id = 1510101
	random = no
	country = GER
	
	trigger = {
		ai = yes
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }

	action_a = {
		name = "We are on track with current research and production allocation" 
		command = { type = sleepevent which = 9500510 }
	}
	action_b = {
		name = "Favor Guderian and his concepts; develop the Tiger" 
		command = { type = ai which = core_GER_Guderian.ai }
		command = { type = prio_research which = 2300 }   #Basic Tanks
		command = { type = prio_research which = 4401 }   #Vehicle Mass Assembly
		command = { type = start_research which = 2200 }  #Amphibious Tanks
		command = { type = start_research which = 14200 } #Medium Artillery Pieces
		command = { type = prio_research which = 14200 }  #Medium Artillery Pieces
		command = { type = prio_research which = 2200 }   #Amphibious Tanks
	}
	action_c = {
		name = "Develop the lethal Wolfpack and conquer England"
		command = { type = sleepevent which = 9500510 }
		command = { type = ai which = core_GER_Kriegsmarine.ai }
		command = { type = prio_research which = 4402 }   #Ship Mass Assembly
		command = { type = start_research which = 5300 }  #Early War Submarine Technology
		command = { type = prio_research which = 5300 }   #Early War Submarine Technology
		command = { type = start_research which = 13200 } #Interwar Naval Experience Doctrine
		command = { type = prio_research which = 13200 }  #Interwar Naval Experience Doctrine
	}
}

event = {
	id = 1510102
	random = no
	country = GER
	
	trigger = {
		ai = yes
		year = 1939
		event = 1510101 # Kriegsmarine AI
		OR = {
			event = 1510084 # GER_38 AI
			event = 1510092 # GER_mid39 AI
		}
		NOT = { event = 1510093 } # GER_FallRot AI, thereby derailing naval builds
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 4 month = june year = 1939 } 
	offset = 11
	deathdate = { day = 30 month = january year = 1940 }

	action_a = {
		command = { type = ai which = core_GER_Wolfpack.ai }
	}
}

event = {
	id = 1510105
	random = no
	country = GER
	
	trigger = {
		ai = yes
		OR = {
			war = { country = GER country = SPA }
			war = { country = GER country = SPR }
			war = { country = GER country = POR }
		}
		OR = {
			event = 10001 # GER_BoB.ai
			AND = {
				year = 1941
				event = 1510101 # GER_Wolfpack.ai
			}			
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 } 
	offset = 25
	deathdate = { day = 1 month = january year = 1949 }

	action_a = { 
		command = { type = ai which = core_GER_Conquistador.ai }
	}
}



###############################
# Slovakia AI Strategy
###############################

# Slovakia loads aggressive AI for Fall Weiss and beyond

event = {
	id = 1510103
	random = no 
	country = SLO
	
	trigger = { 
		ai = yes
		exists = POL
		OR = {
			event = 2050 #MR Pact
			event = 2051 #MR Pact
			event = 1510092 #German_mid39 AI file
			war = { country = POL country = GER }
		}
		OR = {
			alliance = { country = GER country = SLO }
			puppet = { country = SLO country = GER }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 2 month = april year = 1937 }
	offset = 29
	deathdate = { day = 30 month = may year = 1941 }

	action_a = {
		command = { type = ai which = core_SLO_FallWeiss.ai }
	}
}


# Slovakia reloads initial AI file for Home Defense

event = {
	id = 1510104
	random = no
	country = SLO
	
	trigger = {
		ai = yes
		atwar = yes
		OR = {
			NOT = { exists = POL }
			event = 2050 # FallWeiss has occurred
			event = 2051 # FallWeiss has occurred
		}
		event = 1510103 #load of previous SLO FallWeiss AI
		OR = {
			war = { country = SLO country = ROM }
			AND = {
				war = { country = SLO country = SOV }
				year = 1943
				OR = {
					control = { province = 721 data = SOV } #Soviets approaching!
					control = { province = 774 data = SOV }
					control = { province = 770 data = SOV }
					control = { province = 764 data = SOV }
					control = { province = 643 data = SOV } 
				}
			}
		}
	}

	name = AI_EVENT 
	desc = ""
	style = 0

	date = { day = 3 month = april year = 1939 } 
	offset = 18
	deathdate = { day = 1 month = january year = 1949 }

	action_a = {
		command = { type = ai which = core_Slovakia.ai }
	}
}

#
# France goes offensive (by Copper Nicus)
# This event is designed for HARD C.O.R.E. add-on
#
###########################################################################



event = {
	id = 1510150
	random = no
	country = FRA

	trigger = {
		ai = yes
		event = 1400031 # Hard CORE is on!
		war = { country = FRA country = GER }
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 15
	deathdate = { day = 30 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_FRA_attack.ai }
		command = { type = sleepevent which = 1510039 } # No static defense
	}
}

############################
#  ITALIAN AI 
############################


event = {
	id = 9500200
	random = no
	country = ITA

	trigger = {
		ai = yes
		NOT = { event = 1510048 }	#core_ITA_Axis.ai
		OR = {
			technology = 2316   #Basic Medium Tank (37mm+)
			technology = 2317   #Basic Medium Tank (40mm+)
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 30
	deathdate = { day = 30 month = december year = 1949 }

	action_a = {
		command = { type = ai which = "core_ITA_CarriArmati.ai" }
		command = { type = build_division which = armor }
		command = { type = build_division which = armor }
	}
}


event = {
	id = 9500201
	random = no
	country = ITA

	trigger = {
		ai = yes
		exists = ALB
		NOT = {
			war = { country = ITA country = FRA }
			war = { country = ITA country = ENG }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1939 }
	offset = 5
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = ai which = "core_ITA_Zog.ai" }
	}
}

event = {
	id = 9500202
	random = no
	country = ITA

	trigger = {
		ai = yes
		event = 9500201 	# core_ITA_Zog.ai
		NOT = { event = 1510048	}	# core_ITA_Axis.ai
		NOT = { exists = ALB }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 15 month = april year = 1939 }
	offset = 15
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = ai which = "core_ITA_38.ai" }
	}
}

event = {
	id = 9500203
	random = no
	country = ITA

	trigger = {
		ai = yes
		event = 2903  #Annexation of Albania - Zog refuses
		war = { country = ALB country = ITA }
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 25 month = march year = 1939 }
	offset = 1
	deathdate = { day = 15 month = august year = 1939 }

	action_a = {
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
		command = { type = add_division which = transports }
	}
}

event = {
	id = 9500204
	random = no
	country = ITA

	trigger = {
		ai = yes
		OR = {
			war = { country = GRE country = ITA }
			war = { country = YUG country = ITA }
		}
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 10
	deathdate = { day = 15 month = december year = 1947 }

	action_a = {
		command = { type = ai which = core_ITA_Balkans.ai }
	}
}



####


##################################################################################
########## USSR Prepares for Kalkin Gol - to deal with ahistorical war (by Copper)
##################################################################################

event = {
	id = 9500205
	random = no
	country = SOV

	# Pre KalkinGol AI

	trigger = {
		ai = yes
		atwar = no
	}
	
	name = AI_EVENT
	desc =""
	style = 0

	date = { day = 1 month = july year = 1939 }
	offset = 3 
	deathdate = { day = 29 month = december year = 1939 }

	action_a = {
		command = { type = ai which = core_SOV_KalkinGol.ai }
	}
}

##################################################################################
########## USSR Prepares for Winter War - fast kill (by Copper)
##################################################################################


event = {
	id = 1510120 
	random = no
	country = SOV

	trigger = {
		ai = yes
		event = 2013 		# Historical Mol-Rib	
	}

	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = september year = 1939 }
	offset = 3
	deathdate = { day = 30 month = january year = 1940 }

	action_a = {
		command = { type = ai which = core_SOV_WinterWar.ai }
		command = { type = sleepevent which = 9500206 } # sleep Unholy Alliance AI
	}
}


##################################################################################
########## USSR Unholy Alliance AI - support (by Copper)
##################################################################################

event = {
	id = 9500206
	random = no
	country = SOV

	# Unholy Alliance AI

	trigger = {
		ai = yes
		alliance = { country = GER country = SOV }		
		}
	
	name = AI_EVENT
	desc =""
	style = 0

	date = { day = 1 month = july year = 1939 }
	offset = 3 
	deathdate = { day = 29 month = december year = 1939 }

	action_a = {
		command = { type = ai which = core_SOV_Unholy.ai }
		command = { type = sleepevent which = 1510055 } # sleep standard 40' AI
		command = { type = sleepevent which = 1510120 } # sleep Winter War AI

	}
}
##################################################################################
########## USA-UK Wars merge (AI UK and AI USA only) (by Copper)
##################################################################################

event = {
	id = 9500207
	random = no
	country = USA


	trigger = {		
		ai = yes
		warentry = 100
		war = { country = JAP country = USA }		
		war = { country = JAP country = ENG }
		
		event = 1500153 # ENG is AI too		

		NOT = {
			puppet = { country = ENG country = GER } 
			puppet = { country = USA country = GER } 
			alliance = { country = GER country = USA }		
			alliance = { country = ENG country = USA }
		}
	}
	
	name = AI_EVENT
	desc = ""
	style = 0

	date = { day = 1 month = july year = 1939 }
	offset = 3 
	deathdate = { day = 29 month = december year = 1946 }

	action_a = {
		command = { type = alliance  which = ENG }

	}
}
